<?php
header("Content-type:text/html; charset=utf-8");
include_once 'conn/conn.php';
$sql = "select * from tb_admin";
$rs = mysql_query($sql); 
while ($contents = mysql_fetch_array($rs)){
	$result[] = $contents;
}

?> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>php分页示例</title>
<link rel="stylesheet" href="templets/css/common.css" type="text/css" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="../js/jquery-1.6.2.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
	$('.tb').hover(function(){
		$(this).css('background','#afe8fd').siblings().css('background','#fff');
	})
})
</script>
</head>

<body>
<div id="man_zone">
	<table width="99%" border="0" align="center"  cellpadding="1" cellspacing="0" class="table_style">
		<tr>
			<td width="5%" class="center nos">ID</td>
      		<td width="35%" class="center nos">用户名</td>
      		<td width="40%" class="center nos">用户密码</td>
      		<td width="20%" class="center nos">操作</td>
		</tr>
		<?php
			foreach ($result as $row){
		?>
		<tr class="tb">
			<td class="center nos"><?php echo ($row["id"]);?></td>
			<td class="center nos"><?php echo ($row["name"]);?></td>
			<td class="center nos"><?php echo ($row["pwd"]);?></td>
			<td class="center nos"><a href="user_edit.php?id=<?php echo ($row["id"]);?>">修改</a>&nbsp;|&nbsp;<a href="user_del.php?id=<?php echo ($row["id"]);?>">删除</a></td>
		</tr>
		<?php
			}
		?>
	</table>

</div>
</body>
</html>